﻿<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
<base href="<%=basePath%>">
		<!-- ace styles -->
<link href="static/css/bootstrap.min.css" rel="stylesheet" />
<script src='static/js/jquery-2.1.3.min.js'></script>
<script type="text/javascript" src="static/js/bootstrap-datepicker.min.js"></script>
<script type="text/javascript" src="static/js/bootstrap.min.js"></script>
<link rel="stylesheet" href="static/css/ace.min.css" />
<link rel="stylesheet" href="static/css/ace-responsive.min.css" />
<link rel="stylesheet" href="static/css/ace-skins.min.css" />
<script type="text/javascript" src="static/js/layer.js"></script>
<script type="text/javascript" src="plugins/jquery.form.js"></script>
<link rel="stylesheet" href="static/css/layui.css" media="all">
<style type="text/css">
	td.center, th.center {
  	  text-align: center !important;
	}
</style>
<script type="text/javascript">

$(function(){
	 //日期框
	 $('.date-picker').datepicker();
	 //提交表单
	 $("#searchList").click(function(){
		 $("#pageForm").submit();
		 
	 })
	 
 })
</script>
</head>

<body>
		<div>
		<form action="<%=basePath%>system/log.do" method="post" name="pageForm" id="pageForm" class="form-inline">
			<!-- 高级查询=============================================================== -->
			<div style="border: 1px solid darkgray;padding: 6px; ">
                      <div class="form-line" style="line-height: 40px">
                          <label class="input-group-addon">操作类型：</label>
                          <input style="width: 150px" type="text" class="form-control" name="optType" value="${pd.optType}" />
                          <label class="input-group-addon">操作记录：</label>
                          <input style="width: 150px" type="text" class="form-control" name="optInfo" value="${pd.optInfo}" />
                          <label class="input-group-addon">操作IP：</label>
                          <input style="width: 150px" type="text" class="form-control" name="ip" value="${pd.ip}" />
                          <label class="input-group-addon">操作人：</label>
                          <input style="width: 150px" type="text" class="form-control" name="operatorName" value="${pd.operatorName}" />
                          <label class="input-group-addon">操作时间：</label>
                          <input style="width: 150px" type="text" class="form-control date-picker" data-date-format="yyyy-mm-dd" name="minCreateTime" value="${pd.minCreateTime}" />-
                          <input style="width: 150px" type="text" class="form-control date-picker" data-date-format="yyyy-mm-dd" name="maxCreateTime" value="${pd.maxCreateTime}" />
                      </div>
                      <span  class="form-line">
                          <label class="btn btn-primary btn-small" id="searchList">查询</label>
                      </span>
                  </div>
			<br>
			<!-- 高级查询=============================================================== -->
			<table id="table_report"
				class="table table-bordered table-hover">
				<thead>
					<tr>
						<th>序号</th>
						<th>系统类型</th>
						<th>操作类型</th>
						<th>操作记录</th>
						<th>操作结果</th>
						<th>操作人</th>
						<th>操作IP</th>
						<th>操作时间</th>
					</tr>
				</thead>
				<tbody>
					<!-- 开始循环 -->
					<c:choose>
						<c:when test="${not empty pageList}">
							<c:if test="${true}">
								<c:forEach items="${pageList}" var="var" varStatus="vs">
									<tr>
										<td>${vs.count}</td>
										<td>催收系统</td>
										<td>${var.optType}</td>
										<td>
										<a title='${var.optInfo}' style="cursor: pointer;"> 
											<c:if test="${fn:length(var.optInfo) >= 20 }">
												${fn:substring(var.optInfo,0,20)}...
											</c:if>
											<c:if test="${fn:length(var.optInfo) < 20 }">
												${var.optInfo}
											</c:if>
											</a>
										</td>
										<td>${var.optStatus == 0 ? '成功' : '失败'}
										</td>
										<td>${var.operatorName}</td>
										<td>${var.ip}</td>
										<td><fmt:formatDate value="${var.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
									</tr>
								</c:forEach>
							</c:if>
						</c:when>
						<c:otherwise>
							<tr class="main_info">
								<td colspan="100" class="center">没有相关数据</td>
							</tr>
						</c:otherwise>
					</c:choose>
				</tbody>
			</table>
			<div class="page-header position-relative">
				<table style="width: 100%;">
					<tr>
						<td style="vertical-align: top;">
						<div class="pagination"
								style="float: right; padding-top: 0px; margin-top: 0px;">${page.pageStr}
						</div></td>
					</tr>
				</table>
			</div>
		</form>
	</div>
<script type="text/javascript">
	$(top.hangge());
</script>

</body>
</html>

